<?php
/**
 * Created by PhpStorm.
 * User: CC
 * Date: 2016/3/9
 * Time: 23:38
 */
//创建画布
$width=80;
$height=20;
$image=imagecreatetruecolor($width,$heigth);
$white=imagecolorallocate($image,255,255,255);
$black=imagecolorallocate($image,0,0,0);
//用填充矩形填充画布
imagefilledrectangle($image,1,1,$width-2,$height-2,$white);
$char=buildRandomString($type,$length);
$sess_name="verify";
$_SESSION[$sess_name]=$char;
for()